﻿namespace Common
{
    public class ConstParameters
    {
        /// <summary>
        /// WCF communication  Port 85
        /// </summary>
        public const int WcfPort = 9588;

        /// <summary>
        /// AcceptServer TcpListen Port
        /// </summary>
        public const int AstPort = 8588;


        public const int TransferListenPort = 9999;

        public const int PlatformStationPort = 9223;

        /// <summary>
        /// Message Head Length(+First and Last identification+Check bit) 
        /// </summary>
        public const int MhLenth = 19;

        /// <summary>
        /// Message body Start Index
        /// </summary>
        public const int MBodySatrtIndex = 17;


        /// <summary>
        /// Max TaxiInfo In One Message (Must less than 23)
        /// </summary>
        public const int MaxTaxiInfoInOneMessage = 10;



        /// <summary>
        /// How long Time to Clear  out of date  Taxi  Cache. Unit : second
        /// </summary>
        public const int ClearTaxiCacheTime = 10 * 60; //second

        /// <summary>
        /// 0
        /// </summary>
        public const int TypeTaxi = 0;
        /// <summary>
        /// 1
        /// </summary>
        public const int TypePhoneUser = 1;
        /// <summary>
        /// 2
        /// </summary>
        public const int TypeTaxiDispatchClient = 2;



        public const byte CarTypeOfTaxi = 0x01;
        public const byte CarTypeOfRent = 0x02;
        public const byte CarTypeOfPrivate = 0x03;
        public const byte CarTypeOfAmbulance = 0x04;
        

        //public enum CarType
        //{
        //    Taxi,
        //    Rent,
        //    Private
        //};


        #region Command  Code
        //CmdRetweet
        public const ushort CmdRetweet = 0x0015;

        //CmdRetweetTaxiDispatchClient
        public const ushort CmdRetweetTaxiDispatchClient = 0x8098;
        public const ushort CmdRetweetTaxiDispatchClientNoipInData = 0x8088;

        //LogoutSocketInTransferServer
        public const ushort CmdLogoutInTransfer = 0x8099;


        //UploadingTradeinfo
        public const ushort CmdTaxiUploadingTradeinfo = 0x0B01;
        public const ushort CmdTaxiUploadingTradeinfoReply= 0x8B01;


        //GetNearByTaxi
        public const ushort CmdTaxiGetNearbyTaxi = 0x00F0;
        public const ushort CmdTaxiGetNearbyTaxiReply = 0x80F0;
        public const ushort CmdTaxiGetNearbyTaxi2 = 0x0B04;
        public const ushort CmdTaxiGetNearbyTaxiReply2 = 0x8B04;
         
        //UpdataWarningInfo
        public const ushort CmdTaxiUpdataWarningInfo = 0x0B03;
        public const ushort CmdTaxiUpdataWarningInfoRely = 0x8B03;


        //UpdataGpsInfo
        public const ushort CmdTaxiUpdataGpsInfo = 0x0200;
        public const ushort CmdTaxiUpdataGpsInfo2 = 0x0202;

        // Is Calling
        public const ushort CmdTaxiIsCalling = 0x0026;
        public const ushort CmdTaxiIsCallingReply = 0x8026;

    //    public const ushort CmdTaxiUpdataGpsInfoReply = 0x8200;

        public const ushort CmdTaxiUpdataImageGpsInfo = 0x0017;
        public const ushort CmdTaxiUpdataImageGpsInfoReply = 0x8017;

        //get warning config
        public const ushort CmdTaxiGetWarningConfig = 0x0085;
        public const ushort CmdTaxiGetWarningConfigReply = 0x8085;


        //Register
        public const ushort CmdTaxiRegister = 0x0100;
        public const ushort CmdTaxiRegisterReply = 0x8100;
        public const ushort CmdTaxiRegister2 = 0x0029;
        public const ushort CmdTaxiRegisterReply2 = 0x8029;

        public const ushort CmdTaxiRegister3 = 0x0034;
        public const ushort CmdTaxiRegisterReply3 = 0x8034;

        public const ushort CmdPrivateCarRegistRequest = 0x0037;
        public const ushort CmdPrivateCarRegistRequestReply = 0x8037;

        public const ushort CmdPrivateCarVerifyRegistCode = 0x0036;
        public const ushort CmdPrivateCarVerifyRegistCodeReply = 0x8036;
         
        public const ushort CmdPhoneUserGetNearByByCarType = 0x0038;
        public const ushort CmdPhoneUserGetNearByByCarTypeReply = 0x8038;

        public const ushort CmdTaxiGetNearByByCarType = 0x0039;
        public const ushort CmdTaxiGetNearByByCarTypeReply = 0x8039;

        public const ushort CmdCarSetSignature = 0x0040;     //车辆设置签名
        public const ushort CmdCarSetSignatureReply = 0x8040;

        public const ushort CmdPrivateCarSetInfos = 0x0041;//私家车设置个人信息
        public const ushort CmdPrivateCarSetInfosReply = 0x8041;

        public const ushort CmdSendSignatureWhenRegist = 0x8042;
        public const ushort CmdSendPrivateCarInfoWhenRegist = 0x8044;

        public const ushort CmdPrivateCarRegister = 0x0043;//私家车注册
        public const ushort CmdPrivateCarRegisterReply = 0x8043;

         
        public const ushort CmdPhoneUseGetNearbyCar = 0x0045;
        public const ushort CmdPhoneUserGetNearbyCarReply = 0x8045;


        public const ushort CmdPhoneUserRegistRequest = 0x0046;//手机注册短信请求
        public const ushort CmdPhoneUserRegistRequestReply = 0x8046;//手机注册短信请求返回

        public const ushort CmdPhoneUserVerifyRegistCode = 0x0047;//手机注册验证
        public const ushort CmdPhoneUserVerifyRegistCodeReply = 0x8047;//验证结果返回

        public const ushort CmdGetCarClientVersion = 0x0048;
        public const ushort CmdGetCarClientVersionReply = 0x8048;

        public const ushort CmdPasseagerCallCar = 0x0049;//乘客希望叫车 主要用与120
        public const ushort CmdPasseagerCallCarReply = 0x8049;

        public const ushort CmdSpecialCarRegist = 0x0050;
        public const ushort CmdSpecialCarRegistReply = 0x8050;

        public const ushort CmdUpdateGpsWithCarType = 0x0051;

        //平台向乘客发送约定车辆的信息
        public const ushort CmdSendCarAgreeOnInfoByClient = 0x8052;

        //平台向客户、司机发送目的地信息
        public const ushort CmdSendDestinationInfoByClient = 0x8053;

        //平台向司机发送约定乘客的信息
        public const ushort CmdSendPassengerAgreeOnInfoByClient = 0x8054;


        public const ushort CmdSendByClientPublicId = 0x8666;


        // Is Calling
        public const ushort CmdTaxiMonitorReply = 0x0028;
        public const ushort CmdTaxiMonitor = 0x8028;

        // Taxi LED Ad set
        public const ushort CmdSetTaxiAd = 0x8300;

        //TaxiQueryAd
        public const ushort CmdTaxiQueryAd = 0x0013;
        public const ushort CmdTaxiQueryAdReply = 0x8013;

        //TaxiQueryArea
        public const ushort CmdTaxiQueryArea = 0x0014;
        public const ushort CmdTaxiQueryAreaReply = 0x8014;


        //UpdataGpsInfo
        public const ushort CmdPhoneUpdataLog = 0x0099;

        //GetTaxiNO
        public const ushort CmdTaxiGetTaxiNo = 0x0032;
        public const ushort CmdTaxiGetTaxiNoReply = 0x8032;

        //GetBlackList
        public const ushort CmdTaxiGetBlackList = 0x0033;
        public const ushort CmdTaxiGetBlackListReply = 0x8033;


        //-----------------TaxiDispatchClient---------------TransferServer--------------------Taxi------------------
        //Taxi camera take photos
        public const ushort CmdTaxiTakeAPhoto = 0x8801;
        public const ushort CmdTaxiTakeAPhotoReply = 0x0801;
        public const ushort CmdTaxiTakeAPhotoReplyReply = 0x8802;
        //Taxi  take a video
        public const ushort CmdTaxiTakeAVideo = 0x8804;
        public const ushort CmdTaxiTakeAVideoReply = 0x0804;
        public const ushort CmdTaxiTakeAVideoReplyReply = 0x8803;


        public const ushort CmdTaxiCutOil = 0x8027;
        public const ushort CmdTaxiCutOilReply = 0x0027;

        //Send recruit car sms
        public const ushort CmdSendSmsToTaxi = 0x0016;
        public const ushort CmdSendSmsToTaxiReply = 0x8016;
        public const ushort CmdTaxiResponseSuccess = 0x0020;
        public const ushort CmdSendSmsToTaxiReplyRightNow = 0x0019;

        //Send recruit car News 
        public const ushort CmdSendNewsToTaxi = 0x8300;
        public const ushort CmdSendNewsToTaxiReply = 0x8301;
        //----------------------------------------------------------------------------------------------------------
     




        //CmdPhoneUserGrade
        public const ushort CmdPhoneUserGrade = 0x0023;
        public const ushort CmdPhoneUserGradeRely = 0x8023;


        public const ushort CmdPhoneUserUploadingTradeinfo = 0x0B02;
        public const ushort CmdPhoneUserUploadingTradeinfoReply = 0x8B02;

        //GetNearbyTaxi
        public const ushort CmdPhoneUseGetNearbyTaxi = 0x0B00;
        public const ushort CmdPhoneUserGetNearbyTaxiReply = 0x8B00;

        public const ushort CmdPhoneUseGetNearbyTaxi2 = 0x0B05;
        public const ushort CmdPhoneUserGetNearbyTaxiReply2 = 0x8B05;

        public const ushort CmdPhoneUserGetNearbyRentCar = 0x0B06;
        public const ushort CmdPhoneUserGetNearbyRentCarReply = 0x8B06;



        public const ushort CmdIPhoneUserRegister = 0x0701;
        public const ushort CmdIPhoneUserRegisterReply = 0x8701;

        //RegisterCode Updata
        public const ushort CmdPhoneUserUpdataRegisterCode = 0x0025;
        public const ushort CmdPhoneUserUpdataRegisterCodeReply = 0x8025;

        public const ushort CmdPhoneUserRegister = 0x0012;
        public const ushort CmdPhoneUserRegisterReply = 0x8012;

        public const ushort CmdPhoneUserRegister2 = 0x0030;
        public const ushort CmdPhoneUserRegisterReply2 = 0x8030;





        //-------------------------StationClient-----------------
        public const ushort CmdStationGetClientVersion = 0x0003;
        public const ushort CmdStationClientVersionReply = 0x8003;

        public const ushort CmdStationGetClientVersionWithCurrentVersion = 0x0005;        

        public const ushort CmdSendADToStation = 0x8002;

        //GetStationList
        public const ushort CmdGetStationList = 0x0004;
        public const ushort CmdGetStationListReply = 0x8004;

        //GetAdUrlList
        public const ushort CmdGetStationAdUrlList = 0x0006;
        public const ushort CmdGetStationAdUrlListReply = 0x8006;

        public const ushort CmdStationGetNewestXmlVersion = 0x0007;
        public const ushort CmdStationGetNewestXmlVersionReply = 0x8007;

        #endregion


        #region YOU KNOW 平台

        public const ushort CmdPhonePlatformLogin = 0x0055;
        public const ushort CmdPhonePlatformLoginReply = 0x8055;

        public const ushort CmdPhonePlatformUpdateArea = 0x0056;
        public const ushort CmdPhonePlatformUpdateAreaReply = 0x8056;

        #endregion



        #region 服务监督卡身份验证
        
        public const ushort CmdTaxiCheckIdentity = 0x0057;
        public const ushort CmdTaxiCheckIdentityReply = 0x8057;

        public const ushort CmdTaxiChangePasswordOfIdCard = 0x0058;
        public const ushort CmdTaxiChangePasswordOfIdCardReply = 0x8058;

        public const ushort CmdPhoneNumberExistInDbFingerPrint = 0x8059;
        #endregion


    }
}
